package com.example.shop.model.resp;

import com.example.shop.entity.GoodsSku;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author qwert
 * @version 1.0.0
 * @create 2025/9/3 22:28
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class GoodsDetail {
    private String goodsId;
    private String title;
    private Long price;
    private Long marketPrice;
    // 商品发布状态
    private Integer status;
    private Long saleTime;
    private boolean haveSku;
    private String mainImage;
    private List<String> images;
    private String brand;
    private String brandIcon;
    private List<String> tags;
    private List<String> detailImages;
    private List<SaleAttrs> saleAttrs;
    private List<GoodsSku> skus;
    private ShopDetail shop;

    public GoodsDetail createGoodsDetail() {
        return GoodsDetail.builder()
                .goodsId("2028608294324840472576")
                .title("「崩坏：星穹铁道」光锥系列亚克力流沙立牌")
                .price(114500L)
                .marketPrice(114500L)
                .status(2)
                .saleTime(1753272000L)
                .haveSku(true)
                .mainImage("https://act-webstatic.mihoyo.com/upload/mall/2025/07/21/149433e311027bd440c5308731e5f8a2_4642751770306204096.jpeg")
                .images(Arrays.asList(
                        "https://act-webstatic.mihoyo.com/upload/mall/2025/07/21/fba71928875619aae089cd47ce826fb4_7831665216138524295.jpg",
                        "https://act-webstatic.mihoyo.com/upload/mall/2025/06/11/40a7829bf698099cfc25f0616bbe9c76_3146889449930295136.jpg",
                        "https://act-webstatic.mihoyo.com/upload/mall/2025/06/11/6b7a3adadeaf13131b7bec9b8a9fe790_5528926840060211236.jpg",
                        "https://act-webstatic.mihoyo.com/upload/mall/2025/04/28/90519f131d68edf6f5d1c386d6963508_6909338589741336549.jpg",
                        "https://act-webstatic.mihoyo.com/upload/mall/2025/07/21/2ab3475e17190a81a6cc73688ca080ed_4433694195853194354.jpg"))
                .brand("崩坏：星穹铁道")
                .brandIcon("https://webstatic.mihoyo.com/upload/static-resource/2023/04/19/8bd2b680b62364553e8990fbcf3b72b0_3834262096164886047.png")
                .tags(Arrays.asList("recommended", "new"))
                .detailImages(Arrays.asList(
                        "https://act-webstatic.mihoyo.com/upload/mall/2025/07/21/b7a306e09fc9b0b4a681122e779ed285_7941137236355704577.jpg",
                        "https://act-webstatic.mihoyo.com/upload/mall/2025/07/21/73fabb7a9086d09f4b4d0414185d56b1_3769944463178526143.jpg",
                        "https://act-webstatic.mihoyo.com/upload/mall/2025/07/21/cd7764398b353810c1203143354a7844_1934066226442819606.jpg",
                        "https://act-webstatic.mihoyo.com/upload/mall/2025/07/21/a090a4d35094e815ebd3695993c8ee67_1405420394399310966.jpg",
                        "https://act-webstatic.mihoyo.com/upload/mall/2025/07/21/a40bb2b18be6aef387028d94a2fe923a_7867910601904560627.jpg"
                ))
                .saleAttrs(
                        Collections.singletonList(SaleAttrs.builder()
                                .name("款式")
                                .content(Arrays.asList(
                                        SaleAttrs.SkuInfo.builder().isChose(true).text("银河铁道之夜").imgUrl("https://act-webstatic.mihoyo.com/upload/mall/2023/04/20/028231e595d24079193fd1d57fd22c75_2215053727774538371.jpeg").key("c85882c66923b9a8").build(),
                                        SaleAttrs.SkuInfo.builder().isChose(true).text("黎明恰如此燃烧【二批次预售】").imgUrl("https://act-webstatic.mihoyo.com/upload/mall/2025/07/21/149433e311027bd440c5308731e5f8a2_2642533864955498787.jpeg").key("d3cb4ecb03d3da66").build(),
                                        SaleAttrs.SkuInfo.builder().isChose(true).text("决心如汗珠般闪耀").imgUrl("https://act-webstatic.mihoyo.com/upload/mall/2023/09/22/d99b182c2c63636840f386373fdd87cb_5792462614188552452.jpeg").key("m93c958a1efd5c48").build(),
                                        SaleAttrs.SkuInfo.builder().isChose(true).text("海洋为何而歌【预售】").key("i9a896dadb3dc04c").imgUrl("https://act-webstatic.mihoyo.com/upload/mall/2025/09/01/700612daa85b6a38b93620b0f25e653b_6575481366573296578.jpeg").build(),
                                        SaleAttrs.SkuInfo.builder().isChose(true).text("游戏尘寰").key("ibe940a4a05872d8").imgUrl("https://act-webstatic.mihoyo.com/upload/mall/2024/03/01/4e5f495367ae95042f846dedc8fc096c_2026807058628477142.jpeg").build()
                                ))
                                .isOpen(false)
                                .key("kcd81353e2b5b177")
                                .build()))

                .shop(ShopDetail.builder()
                        .shopCode("xqtd")
                        .shopName("货全杂货铺")
                        .icon("https://mock-url")
                        .cert(true)
                        .official(true)
                        .build())
                .build();
    }
}
